Sub readxl()
    Dim wdApp As Object
    Dim xlApp As Object
    Dim wb As Object
    Dim iRow%, iColumn%
    Dim xlPath$
    xlPath = "F:\heyan\Desktop\漠河市房屋建筑安全隐患排查汇总表(1).xls"
    Set xlApp = CreateObject("excel.application")
    Set wb = xlApp.Workbooks.Open(xlPath)
    
    '改造表格,依赖 inputTableValue 函数
    With wb.worksheets(3)
        For iRow = 1 To 45
            inputTableValue iRow, 2, 2, .Cells(iRow + 4, 3) & .Cells(iRow + 4, 2)
            inputTableValue iRow, 4, 2, .Cells(iRow + 4, 5)
            If .Cells(iRow + 4, 6) <> "" Then
                inputTableValue iRow, 5, 2, houseClass(.Cells(iRow + 4, 6))
            End If
            inputTableValue iRow, 5, 4, .Cells(iRow + 4, 7)
            
        Next iRow
    End With
    
    xlApp.Quit
End Sub